package com.soyuan.controller;

import com.soyuan.config.ConfigBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by twx on 2017/9/25.
 */
@RestController
public class UserController {
//    @Value("${com.twx.name}")
//    private  String name;
//    @Value("${com.twx.age}")
//    private  int age;
    @Autowired
    private ConfigBean configBean;

    @RequestMapping("/hello")
    public String hexo(){
        return configBean.getName()+","+configBean.getAge();
    }

//    @RequestMapping("/toLogin")
//    public ModelAndView toLogin(){
//        return new ModelAndView("login");
//    }
}
